package com.huiquan.body.dao;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;

import com.huiquan.body.domain.BodyOrgan;
import com.huiquan.framework.base.EnhancedBaseDao;
import com.ibatis.sqlmap.client.SqlMapClient;

import java.util.List;
import java.util.Map;

@Repository
public class BodyOrganDao extends EnhancedBaseDao<BodyOrgan> {

    @Resource(name = "sqlMapClient")
    private SqlMapClient sqlMapClient;

    public static final String space = "BODY_ORGAN.";

    public BodyOrganDao() {
        super(space);
    }

    /**
     * @param params
     * @return
     */
    public int selectOrganCount(Map<String, Object> params) {
        return (int) this.object(space + "SELECT_ORGAN_COUNT", params, sqlMapClient);
    }

    @SuppressWarnings("unchecked")
    public List<BodyOrgan> selectOrganList(Map<String, Object> params) {
        return (List<BodyOrgan>) this.list(space + "SELECT_ORGAN_LIST", params, sqlMapClient);
    }
}
